from django.contrib import admin
from django.urls import path, include

from django.conf import settings
from django.conf.urls.static import static

from .views import test_cors
from user import views as user_views
from dtoken import views as token_views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('test_cors/', test_cors),
    path('v1/users', user_views.UserViews.as_view()),
    path('v1/users/', include("user.urls")),
    path('v1/topics/', include("topic.urls")),
    path('v1/tokens/', token_views.tokens),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)